package ysc.cqnu.operdb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import ysc.cqnu.operdb.entity.ResultData;
import ysc.cqnu.operdb.serviceImpl.UpdateCaiJianInfoServiceImpl;
import ysc.cqnu.operdb.serviceImpl.UpdateQinYouInfoServiceImpl;

@CrossOrigin
@Controller
@ResponseBody
public class UpdateQinYouInfoController {
    @Autowired
    private ResultData resultData;
    @Autowired
    private UpdateQinYouInfoServiceImpl updateQinYouInfoService;
    @RequestMapping(value = "/updateQinyouInfo",method = RequestMethod.POST)
    public ResultData updateQinyouInfo(@RequestParam(value = "qinyou") String qinyou, @RequestParam(value = "visualize") String visualize, @RequestParam(value = "purpose") String purpose,
                                        @RequestParam(value = "theSite") String theSite, @RequestParam(value = "rsImg") MultipartFile rsImg, @RequestParam(value = "rsVideo") MultipartFile rsVideo,
                                        @RequestParam(value = "bfDescribe")String bfDescribe, @RequestParam(value = "id")String id){
        System.out.println("清油信息修改前端连接");
        resultData = updateQinYouInfoService.updateQinYouInfoService(qinyou,visualize,purpose,theSite,rsImg,rsVideo,bfDescribe,id);
        return resultData;
    }
}
